
//主程序,业务逻辑
(function(){
	var _COIGIG = [		//关卡
			{				//第1关
				'map':[		//地图数据
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
					[1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1],
					[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
					[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
					[1,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,1],
					[1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,1],
					[1,0,0,0,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,0,0,0,1],
					[1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1],
					[1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1],
					[0,0,0,0,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,0,0],
					[1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1],
					[1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,2,2,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,2,2,2,2,2,2,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,1,1,0,1,2,2,2,2,2,2,1,0,1,1,0,0,0,0,0,0,1],
					[1,0,1,1,0,1,1,1,1,0,1,2,2,2,2,2,2,1,0,1,1,1,1,0,1,1,0,1],
					[1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,0,1],
					[1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1],
					[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
					[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
					[1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1],
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
				],
				'wall_color':'#E08031',
				'goods':{		//能量豆
					'1,2':1,
					'26,2':1,
					'1,23':1,
					'26,23':1
				}
			},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,1,1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1,1,0,1,1,1,1,0,1],
				[1,0,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,0,1],
				[1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#37C6C0',
			'goods':{		//能量豆
				'1,3':1,
				'26,3':1,
				'1,28':1,
				'26,28':1
			}
		},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1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1,0,1],
				[1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1],
				[1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1],
				[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#5ED5D1',
			'goods':{		//能量豆
				'1,3':1,
				'26,3':1,
				'1,27':1,
				'26,27':1
			}
		},				
			{
				'map':[		//地图数据
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
					[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1],
					[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
					[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
					[1,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,1],
					[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1],
					[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
				],
				'wall_color':'#09f',
				'goods':{		//能量豆
					'1,3':1,
					'26,3':1,
					'1,23':1,
					'26,23':1
				}
			},
			{				
				'map':[		//地图数据
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
					[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
					[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
					[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
					[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1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,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
					[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
					[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
				],
				'wall_color':'#FF5983',
				'goods':{		//能量豆
					'1,2':1,
					'26,2':1,
					'1,27':1,
					'26,27':1
				}
			},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,0,0,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1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1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#7E884F',
			'goods':{		//能量豆
				'1,3':1,
				'26,3':1,
				'1,28':1,
				'26,28':1
			}
		},
		{		
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1],
				[0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,1,1,1,0,1,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,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#C9C',
			'goods':{		//能量豆
				'1,3':1,
				'26,3':1,
				'1,24':1,
				'26,24':1
			}
		},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1],
				[0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,0,0,0],
				[1,0,1,1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,0,0,1],
				[1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,2,2,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,2,2,2,2,2,2,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,0,0,0,1,1,0,1,2,2,2,2,2,2,1,0,1,1,0,0,0,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,2,2,2,2,2,2,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1],
				[0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#EB3F2F',
			'goods':{		//能量豆
				'1,4':1,
				'26,4':1,
				'1,25':1,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,0,1,1,1],
				[1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1],
				[0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
				[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#2E68AA',
			'goods':{		//能量豆
				'1,6':1,
				'26,6':1,
				'1,27':1,
				'26,27':1
			}
		},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,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1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1],
				[0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,1,1,0,0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#C1194E',
			'goods':{		//能量豆
				'1,4':1,
				'26,4':1,
				'1,28':1,
				'26,28':1
			}
		},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,1],
				[1,0,1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1],
				[1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1],
				[0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
				[1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#56A36C',
			'goods':{		//能量豆
				'1,3':1,
				'26,3':1,
				'1,28':1,
				'26,28':1
			}
		},
		{				
			'map':[		//地图数据
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
				[1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1],
				[1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1],
				[1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,0,1,1,0,1],
				[1,0,1,1,0,0,0,0,0,0,1,1,0,1,1,0,1,1,0,0,0,0,0,0,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1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0,0,0,1,1,0,0,0,0,0,0,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
				[1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1,1,1,0,1,1,0,1,1,1],
				[1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,1,1,1,1,0,1,1,0,1,1,1,1,1,1,1,1,0,1,1,0,1,1,1,1,0,1],
				[1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1],
				[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
			],
			'wall_color':'#9966CC',
			'goods':{		//能量豆
				'1,4':1,
				'26,4':1,
				'1,27':1,
				'26,27':1
			}
		}
	];
	_COLOR = ['#F00','#F00','#F00','#F00'],	//NPC颜色
	_COS = [1,0,-1,0],
	_SIN = [0,1,0,-1],
	_LIFE = 5,				//玩家生命值
	_SCORE = 0;				//玩家得分

	var game = new Game('canvas');
	//启动页
	(function(){
		var stage = game.createStage();
		//logo
		stage.createItem({
			x: game.width / 2,
			y: game.height * .35,
			width: 100,
			height: 100,
			frames: 3,
			draw: function (context) {
				var t = Math.abs(5 - this.times % 10);
				// 绵羊身体
				context.fillStyle = '#FFF';  // 白色
				context.beginPath();
				context.arc(this.x, this.y, this.width / 2, 0, 2 * Math.PI, false);
				context.fill();
				context.closePath();
		
				// 绵羊的耳朵
				context.fillStyle = '#FFF';  // 白色
				context.beginPath();
				context.arc(this.x - this.width * 0.35, this.y - this.height * 0.3, this.width * 0.2, 0, 2 * Math.PI, false);
				context.arc(this.x + this.width * 0.35, this.y - this.height * 0.3, this.width * 0.2, 0, 2 * Math.PI, false);
				context.fill();
				context.closePath();
		
				// 绵羊的眼睛
				context.fillStyle = '#000';  // 黑色
				context.beginPath();
				context.arc(this.x - this.width * 0.15, this.y - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
				context.arc(this.x + this.width * 0.15, this.y - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
				context.fill();
				context.closePath();
		
				// 绵羊的眼珠
				context.fillStyle = '#000';  // 黑色
				context.beginPath();
				context.arc(this.x - this.width * 0.15, this.y - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
				context.arc(this.x + this.width * 0.15, this.y - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
				context.fill();
				context.closePath();
			}
		});
		
		// 游戏名
		stage.createItem({
			x:game.width/2,
			y:game.height*.5,
			draw:function(context){
				context.font = 'bold 42px PressStart2P';
				context.textAlign = 'center';
				context.textBaseline = 'middle';
				context.fillStyle = '#FFF';
				context.fillText('羊羊能量豆',this.x,this.y);
			}
		});
		// 提示
		stage.createItem({
			x:game.width/2,
			y:game.height*.64,
			frames:28,
			draw:function(context){
				if(this.times%2){
					context.font = 'bold 18px PressStart2P';
					context.textAlign = 'center';
					context.textBaseline = 'middle';
					context.fillStyle = '#AAA';
					context.fillText('按 [Enter] 开始',this.x,this.y);
				}
			}
		});

		//事件绑定
		stage.bind('keydown',function(e){
			switch(e.keyCode){
				case 13:
				case 32:
				game.nextStage();
				break;
			}
		});
	})();
	//游戏主程序
	(function(){
		_COIGIG.forEach(function(config,index){
			var stage,map,beans,items,player;
			stage = game.createStage({
				update:function(){
					var stage = this;
					if(stage.status==1){								//场景正常运行
						items.forEach(function(item){
							if(map&&!map.get(item.coord.x,item.coord.y)&&!map.get(player.coord.x,player.coord.y)){
								var dx = item.x-player.x;
								var dy = item.y-player.y;
								if(dx*dx+dy*dy<750&&item.status!=4){		//物体检测
									if(item.status==3){
										item.status = 4;
										_SCORE += 10;
									}else{
										stage.status = 3;
										stage.timeout = 30;
									}
								}
							}
						});
						if(JSON.stringify(beans.data).indexOf(0)<0){	//当没有物品的时候，进入下一关
							game.nextStage();
						}
					}else if(stage.status==3){		//场景临时状态
						if(!stage.timeout){
							_LIFE--;
							if(_LIFE){
								stage.resetItems();
							}else{
								var stages = game.getStages();
								game.setStage(stages.length-1);
								return false;
							}
						}
					}
				}
			});
			//绘制地图
			map = stage.createMap({
				x:60,
				y:10,
				data:config['map'],
				cache:true,
				draw:function(context){
					context.lineWidth = 2;
					for(var j=0; j<this.y_length; j++){
						for(var i=0; i<this.x_length; i++){
							var value = this.get(i,j);
							if(value){
								var code = [0,0,0,0];
								if(this.get(i+1,j)&&!(this.get(i+1,j-1)&&this.get(i+1,j+1)&&this.get(i,j-1)&&this.get(i,j+1))){
									code[0]=1;
								}
								if(this.get(i,j+1)&&!(this.get(i-1,j+1)&&this.get(i+1,j+1)&&this.get(i-1,j)&&this.get(i+1,j))){
									code[1]=1;
								}
								if(this.get(i-1,j)&&!(this.get(i-1,j-1)&&this.get(i-1,j+1)&&this.get(i,j-1)&&this.get(i,j+1))){
									code[2]=1;
								}
								if(this.get(i,j-1)&&!(this.get(i-1,j-1)&&this.get(i+1,j-1)&&this.get(i-1,j)&&this.get(i+1,j))){
									code[3]=1;
								}
								if(code.indexOf(1)>-1){
									context.strokeStyle=value==2?"#FFF":config['wall_color'];
									var pos = this.coord2position(i,j);
									switch(code.join('')){
										case '1100':
											context.beginPath();
											context.arc(pos.x+this.size/2,pos.y+this.size/2,this.size/2,Math.PI,1.5*Math.PI,false);
											context.stroke();
											context.closePath();
											break;
										case '0110':
											context.beginPath();
											context.arc(pos.x-this.size/2,pos.y+this.size/2,this.size/2,1.5*Math.PI,2*Math.PI,false);
											context.stroke();
											context.closePath();
											break;
										case '0011':
											context.beginPath();
											context.arc(pos.x-this.size/2,pos.y-this.size/2,this.size/2,0,.5*Math.PI,false);
											context.stroke();
											context.closePath();
											break;
										case '1001':
											context.beginPath();
											context.arc(pos.x+this.size/2,pos.y-this.size/2,this.size/2,.5*Math.PI,1*Math.PI,false);
											context.stroke();
											context.closePath();
											break;
										default:
											var dist = this.size/2;
											code.forEach(function(v,index){
												if(v){
													context.beginPath();
													context.moveTo(pos.x,pos.y);
													context.lineTo(pos.x-_COS[index]*dist,pos.y-_SIN[index]*dist);
													context.stroke();
													context.closePath();
												}
											});
									}
								}
							}
						}
					}
				}
			});
			//物品地图
			beans = stage.createMap({
				x: 60,
				y: 10,
				data: config['map'],
				frames: 8,
				draw: function(context) {
					for (var j = 0; j < this.y_length; j++) {
						for (var i = 0; i < this.x_length; i++) {
							if (!this.get(i, j)) {
								var pos = this.coord2position(i, j);
								if (config['goods'][i + ',' + j]) {
									// 绘制绿色草地作为能量豆
									context.fillStyle = "#228B22"; // 草地绿色
									context.beginPath();
									context.arc(pos.x, pos.y, 5, 0, 2 * Math.PI, true); // 调整半径以适应草地的视觉效果
									context.fill();
									context.closePath();
								} else {
									// 如果不是能量豆，则绘制普通背景
									context.fillStyle = "#228B22"; // 绿豆颜色
									context.fillRect(pos.x - 2, pos.y - 2, 4, 4);
								}
							}
						}
					}
				}
			});
			
			//关卡得分
			stage.createItem({
				x:690,
				y:80,
				draw:function(context){
					context.font = 'bold 24px PressStart2P';
					context.textAlign = 'left';
					context.textBaseline = 'bottom';
					context.fillStyle = '#C33';
					context.fillText('得分',this.x,this.y);
					context.font = '24px PressStart2P';
					context.textAlign = 'left';
					context.textBaseline = 'top';
					context.fillStyle = '#FFF';
					context.fillText(_SCORE,this.x+12,this.y+10);
					context.font = 'bold 24px PressStart2P';
					context.textAlign = 'left';
					context.textBaseline = 'bottom';
					context.fillStyle = '#C33';
					context.fillText('关卡',this.x,this.y+72);
					context.font = '24px PressStart2P';
					context.textAlign = 'left';
					context.textBaseline = 'top';
					context.fillStyle = '#FFF';
					context.fillText(index+1,this.x+12,this.y+82);
				}
			});
			//状态文字
			stage.createItem({
				x:690,
				y:285,
				frames:25,
				draw:function(context){
					if(stage.status==2&&this.times%2){
						context.font = '24px PressStart2P';
						context.textAlign = 'left';
						context.textBaseline = 'center';
						context.fillStyle = '#FFF';
						context.fillText('暂停',this.x,this.y);
					}
				}
			});
			//生命值
			stage.createItem({
				x: 705, // 绵羊图标的起始x坐标
				y: 510, // 绵羊图标的y坐标
				width: 30, // 绵羊图标的宽度（可根据需要调整）
				height: 30, // 绵羊图标的高度（可根据需要调整）
				draw: function(context) {
					var max = Math.min(_LIFE - 1, 5); // 计算需要显示的绵羊数量，最多5只
			
					for (var i = 0; i < max; i++) {
						var sheepX = this.x + 40 * i; // 每只绵羊的x坐标，间隔40像素
						var sheepY = this.y; // 绵羊的y坐标
			
						// 绵羊身体
						context.fillStyle = '#FFF';  // 设置填充颜色为白色
						context.beginPath(); // 开始绘制路径
						context.arc(sheepX, sheepY, this.width / 2, 0, 2 * Math.PI, false); // 绘制圆形身体
						context.fill(); // 填充圆形
						context.closePath(); // 结束路径
			
						// 绵羊的耳朵
						context.fillStyle = '#FFF';  // 设置填充颜色为白色
						context.beginPath(); // 开始绘制路径
						// 左耳朵
						context.arc(sheepX - this.width * 0.35, sheepY - this.height * 0.3, this.width * 0.2, 0, 2 * Math.PI, false);
						// 右耳朵
						context.arc(sheepX + this.width * 0.35, sheepY - this.height * 0.3, this.width * 0.2, 0, 2 * Math.PI, false);
						context.fill(); // 填充耳朵
						context.closePath(); // 结束路径
			
						// 绵羊的眼睛
						context.fillStyle = '#000';  // 设置填充颜色为黑色
						context.beginPath(); // 开始绘制路径
						// 左眼睛
						context.arc(sheepX - this.width * 0.15, sheepY - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
						// 右眼睛
						context.arc(sheepX + this.width * 0.15, sheepY - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
						context.fill(); // 填充眼睛
						context.closePath(); // 结束路径
			
						// 绵羊的眼珠
						context.fillStyle = '#000';  // 设置填充颜色为黑色
						context.beginPath(); // 开始绘制路径
						// 左眼珠
						context.arc(sheepX - this.width * 0.15, sheepY - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
						// 右眼珠
						context.arc(sheepX + this.width * 0.15, sheepY - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
						context.fill(); // 填充眼珠
						context.closePath(); // 结束路径
					}
			
					// 可选：如果您仍希望显示生命数量的文字，可以保留以下代码
					context.font = '18px PressStart2P';
					context.textAlign = 'left';
					context.textBaseline = 'center';
					context.fillStyle = '#FFF';
					context.fillText('X', this.x - 15, this.y + 30);
					context.font = '24px PressStart2P';
					context.fillText((_LIFE - 1), this.x + 10, this.y + 26);
				}
			});
			
			//NPC
			for (var i = 0; i < 4; i++) {
				stage.createItem({
					width: 30,
					height: 30,
					orientation: 3,
					color: _COLOR[i],
					location: map,
					coord: { x: 12 + i, y: 14 },
					vector: { x: 12 + i, y: 14 },
					type: 2,
					frames: 10,
					speed: 1,
					timeout: Math.floor(Math.random() * 120),
					update: function () {
						var new_map;
						if (this.status == 3 && !this.timeout) {
							this.status = 1;
						}
						if (!this.coord.offset) { // 到达坐标中心时计算
							if (this.status == 1) {
								if (!this.timeout) { // 定时器
									new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g, 0));
									var id = this._id;
									items.forEach(function (item) {
										if (item._id != id && item.status == 1) { // NPC将其它所有还处于正常状态的NPC当成一堵墙
											new_map[item.coord.y][item.coord.x] = 1;
										}
									});
									this.path = map.finder({
										map: new_map,
										start: this.coord,
										end: player.coord
									});
									if (this.path.length) {
										this.vector = this.path[0];
									}
								}
							} else if (this.status == 3) {
								new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g, 0));
								var id = this._id;
								items.forEach(function (item) {
									if (item._id != id) {
										new_map[item.coord.y][item.coord.x] = 1;
									}
								});
								this.path = map.finder({
									map: new_map,
									start: player.coord,
									end: this.coord,
									type: 'next'
								});
								if (this.path.length) {
									this.vector = this.path[Math.floor(Math.random() * this.path.length)];
								}
							} else if (this.status == 4) {
								new_map = JSON.parse(JSON.stringify(map.data).replace(/2/g, 0));
								this.path = map.finder({
									map: new_map,
									start: this.coord,
									end: this._params.coord
								});
								if (this.path.length) {
									this.vector = this.path[0];
								} else {
									this.status = 1;
								}
							}
							// 是否转变方向
							if (this.vector.change) {
								this.coord.x = this.vector.x;
								this.coord.y = this.vector.y;
								var pos = map.coord2position(this.coord.x, this.coord.y);
								this.x = pos.x;
								this.y = pos.y;
							}
							// 方向判定
							if (this.vector.x > this.coord.x) {
								this.orientation = 0;
							} else if (this.vector.x < this.coord.x) {
								this.orientation = 2;
							} else if (this.vector.y > this.coord.y) {
								this.orientation = 1;
							} else if (this.vector.y < this.coord.y) {
								this.orientation = 3;
							}
						}
						this.x += this.speed * _COS[this.orientation];
						this.y += this.speed * _SIN[this.orientation];
					},
					draw: function (context) {
						var isSick = false;
						if (this.status == 3) {
							isSick = this.timeout > 80 || this.times % 2 ? true : false;
						}
						if (this.status != 4) {
							// 大灰狼形象绘制
							context.fillStyle = isSick ? '#A9A9A9' : '#808080'; // 大灰狼的颜色
							context.beginPath();
							context.arc(this.x, this.y, this.width * 0.5, 0, 2 * Math.PI, true);
							context.fill();
							context.closePath();
			
							// 大灰狼的耳朵
							context.beginPath();
							context.moveTo(this.x - this.width * 0.4, this.y - this.height * 0.4);
							context.lineTo(this.x - this.width * 0.6, this.y - this.height * 0.8);
							context.lineTo(this.x - this.width * 0.2, this.y - this.height * 0.6);
							context.closePath();
							context.fill();
			
							context.beginPath();
							context.moveTo(this.x + this.width * 0.4, this.y - this.height * 0.4);
							context.lineTo(this.x + this.width * 0.6, this.y - this.height * 0.8);
							context.lineTo(this.x + this.width * 0.2, this.y - this.height * 0.6);
							context.closePath();
							context.fill();
			
							// 大灰狼的眼睛
							context.fillStyle = '#FFF';
							context.beginPath();
							context.arc(this.x - this.width * 0.15, this.y - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
							context.arc(this.x + this.width * 0.15, this.y - this.height * 0.1, this.width * 0.1, 0, 2 * Math.PI, false);
							context.fill();
							context.closePath();
			
							// 大灰狼的眼珠
							context.fillStyle = '#000';
							context.beginPath();
							context.arc(this.x - this.width * 0.15, this.y - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
							context.arc(this.x + this.width * 0.15, this.y - this.height * 0.1, this.width * 0.05, 0, 2 * Math.PI, false);
							context.fill();
							context.closePath();
						}
					}
				});
			}
			items = stage.getItemsByType(2);
						
			
			//主角
			player = stage.createItem({
				width:30,
				height:30,
				type:1,
				location:map,
				coord:{x:13.5,y:23},
				orientation:2,
				speed:2,
				frames:10,
				update:function(){
					var coord = this.coord;
					if(!coord.offset){
						if(typeof this.control.orientation != 'undefined'){
							if(!map.get(coord.x+_COS[this.control.orientation],coord.y+_SIN[this.control.orientation])){
								this.orientation = this.control.orientation;
							}
						}
						this.control = {};
						var value = map.get(coord.x+_COS[this.orientation],coord.y+_SIN[this.orientation]);
						if(value==0){
							this.x += this.speed*_COS[this.orientation];
							this.y += this.speed*_SIN[this.orientation];
						}else if(value<0){
							this.x -= map.size*(map.x_length-1)*_COS[this.orientation];
							this.y -= map.size*(map.y_length-1)*_SIN[this.orientation];
						}
					}else{
						if(!beans.get(this.coord.x,this.coord.y)){	//吃豆
							_SCORE++;
							beans.set(this.coord.x,this.coord.y,1);
							if(config['goods'][this.coord.x+','+this.coord.y]){	//吃到能量豆
								items.forEach(function(item){
									if(item.status==1||item.status==3){	//如果NPC为正常状态，则置为临时状态
										item.timeout = 450;
										item.status = 3;
									}
								});
							}
						}
						this.x += this.speed*_COS[this.orientation];
						this.y += this.speed*_SIN[this.orientation];
					}
				},
				draw: function(context) {
					// 主角正常状态绘制为白色绵羊
					if (stage.status != 3) {
						context.fillStyle = '#FFF'; // 绵羊的身体颜色
						// 绘制身体（一个圆形）
						context.beginPath();
						context.arc(this.x, this.y, this.width / 2, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
				
						// 绘制头部（一个小圆形）
						context.beginPath();
						context.arc(this.x, this.y - this.width / 2, this.width / 4, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
				
						// 绘制耳朵（两个小圆形）
						context.beginPath();
						context.arc(this.x - this.width / 3, this.y - this.width / 2, this.width / 6, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
				
						context.beginPath();
						context.arc(this.x + this.width / 3, this.y - this.width / 2, this.width / 6, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
				
						// 绘制眼睛（两个小圆形）
						context.fillStyle = '#000'; // 眼睛颜色
						context.beginPath();
						context.arc(this.x - this.width / 6, this.y - this.width / 2, this.width / 12, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
				
						context.beginPath();
						context.arc(this.x + this.width / 6, this.y - this.width / 2, this.width / 12, 0, 2 * Math.PI);
						context.fill();
						context.closePath();
					} else { // 主角被吃状态绘制为弧形
						if (stage.timeout) {
							context.strokeStyle = '#F00'; // 绘制颜色为红色（或者你可以选择其他颜色）
							context.lineWidth = 2; // 设置线宽
							
							// 计算弧形的角度
							let startAngle = (.5 * this.orientation + 1 - 0.02 * stage.timeout) * Math.PI;
							let endAngle = (.5 * this.orientation - 1 + 0.02 * stage.timeout) * Math.PI;
							
							// 绘制弧形
							context.beginPath();
							context.arc(this.x, this.y, this.width / 2, startAngle, endAngle, false);
							context.stroke();
							context.closePath();
						}
					}
				}
				
			});
			//事件绑定
			stage.bind('keydown',function(e){
				switch(e.keyCode){
					case 13: //回车
					case 32: //空格
					this.status = this.status==2?1:2;
					break;
					case 39: //右
					player.control = {orientation:0};
					break;
					case 40: //下
					player.control = {orientation:1};
					break;
					case 37: //左
					player.control = {orientation:2};
					break;
					case 38: //上
					player.control = {orientation:3};
					break;
				}
			});
		});
	})();
	//结束画面
	(function(){
		var stage = game.createStage();
		//游戏结束
		stage.createItem({
			x:game.width/2,
			y:game.height*.35,
			draw:function(context){
				context.fillStyle = '#FFF';
				context.font = 'bold 48px PressStart2P';
				context.textAlign = 'center';
				context.textBaseline = 'middle';
				context.fillText(_LIFE?'YOU WIN!':'GAME OVER',this.x,this.y);
			}
		});
		//记分
		stage.createItem({
			x:game.width/2,
			y:game.height*.5,
			draw:function(context){
				context.fillStyle = '#FFF';
				context.font = '20px PressStart2P';
				context.textAlign = 'center';
				context.textBaseline = 'middle';
				context.fillText('FINAL SCORE: '+(_SCORE+50*Math.max(_LIFE-1,0)),this.x,this.y);
			}
		});
		//事件绑定
		stage.bind('keydown',function(e){
			switch(e.keyCode){
				case 13: //回车
				case 32: //空格
				_SCORE = 0;
				_LIFE = 5;
				game.setStage(1);
				break;
			}
		});
	})();

	const myFont = new FontFace('PressStart2P', 'url(./PressStart2P.ttf)');
	myFont.load().then(font => {
	  	document.fonts.add(font);
		game.init();
	});
})();
